/**
 * Copyright (C)  2011  chen wei hua.
 * Permission is granted to copy, distribute and/or modify this document
 * under the terms of the GNU Free Documentation License, Version 2.0
 * or any later version published by the Free Software Foundation;
 * with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
 * A copy of the license is included in the section entitled "GNU Free Documentation License".
 */
package com.javaeye.delivery.web;

import java.util.Date;

import com.javaeye.common.dto.DTO;

public class OrderCondition implements DTO {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2176790542618442777L;

	public static final int DATE_TYPE_CURRENT_MONTH = 1;
	
	public static final int DATE_TYPE_PRE_MONTH = 2;
	
	public static final int DATE_TYPE_WARN = 10;
	
	private int createDateType;
	
	private String customName;
	
	private String productName;
	
	private Object[] status;
	
	private Date beginDate;
	
	private Date endDate;
	
	private int customId;
	
	private int logisticsId;
	
	private String logisticsName;

	public int getCreateDateType() {
		return createDateType;
	}

	public void setCreateDateType(int createDateType) {
		this.createDateType = createDateType;
	}

	public String getCustomName() {
		return customName;
	}

	public void setCustomName(String customName) {
		this.customName = customName;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public Object[] getStatus() {
		return status;
	}

	public void setStatus(Object[] status) {
		Object[] newData = new Object[status.length];
		int index = 0;
		for (Object o : status) {
			if (o instanceof String) {
				newData[index++] = Integer.parseInt(o.toString());
			} else {
				newData[index++] = o;
			}
		}
		this.status = newData;
	}

	public Date getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public int getCustomId() {
		return customId;
	}

	public void setCustomId(int customId) {
		this.customId = customId;
	}

	public int getLogisticsId() {
		return logisticsId;
	}

	public void setLogisticsId(int logisticsId) {
		this.logisticsId = logisticsId;
	}

	/**
	 * @param logisticsName the logisticsName to set
	 */
	public void setLogisticsName(String logisticsName) {
		this.logisticsName = logisticsName;
	}

	/**
	 * @return the logisticsName
	 */
	public String getLogisticsName() {
		return logisticsName;
	}
	
}
